from django.db.models import CharField, DateTimeField
from apps.vadmin.op_drf.models import CoreModel


# 制造商表
class Manufacturers(CoreModel):
    name = CharField(max_length=250,null=False,unique=True,verbose_name="制造商名称")
    deleted_datetime = DateTimeField(null=True,verbose_name="删除时间")
    url = CharField(max_length=256,null=True,verbose_name="网站URL")
    support_url = CharField(max_length=256,null=True,verbose_name="网站URL")
    support_phone = CharField(max_length=256,null=True,verbose_name="技术支持电话")
    support_email = CharField(max_length=256,null=True,verbose_name="技术支持邮箱")
    image = CharField(max_length=256,null=True,verbose_name="图片地址URL")

    class Meta:
        verbose_name = '制造商'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.name}"
